﻿using System;
using System.Collections.Generic;
using Model;
namespace BLL
{
    #region class BStudentInfo
    /// <summary>
    /// Interface:StudentInfo Interface
    /// Author:wxc
    /// DateTime:2021/5/26 21:44:23
    /// </summary>	
    public class BStudentInfo
    {
        #region Add Method
        /// <summary>
        /// Insert an item
        /// </summary>
        /// <param name="StudentInfo"></param>
        /// <returns>count of rows affected</returns>
        public int AddStudentInfo(StudentInfoEntity StudentInfo)
        {
            DAL.DALStudentInfo dal = new DAL.DALStudentInfo();
            return dal.AddStudentInfo(StudentInfo);
        }
        #endregion
        #region Mod Method
        /// <summary>
        /// Update an item
        /// </summary>
        /// <param name="StudentInfo"></param>
        /// <returns>count of rows affected</returns>
        public int ModStudentInfo(StudentInfoEntity StudentInfo)
        {
            DAL.DALStudentInfo dal = new DAL.DALStudentInfo();
            return dal.ModStudentInfo(StudentInfo);
        }
        #endregion
        #region Del Method
        /// <summary>
        /// Del an item by primary key
        /// </summary>
        /// <param name="iD"></param> 
        /// <returns>count of rows affected</returns>
        public int DelStudentInfo(string iD)
        {
            DAL.DALStudentInfo dal = new DAL.DALStudentInfo();
            return dal.DelStudentInfo(iD);
        }
        #endregion
        #region Select Method
        /// <summary>
        /// Select an item by Primarykey
        /// </summary>
        /// <param name="iD"></param>
        /// <returns>an item</returns>
        public StudentInfoEntity GetStudentInfo(string iD)
        {
            DAL.DALStudentInfo dal = new DAL.DALStudentInfo();
            return dal.GetStudentInfo(iD);
        }
        #endregion
        #region Select_All Method
        /// <summary>
        /// Select all items
        /// </summary>
        /// <returns>items</returns>
        public IList<StudentInfoEntity> GetStudentInfos()
        {
            DAL.DALStudentInfo dal = new DAL.DALStudentInfo();
            return dal.GetStudentInfos();
        }
        #endregion
        #region public common select by conditions ,we can use it by changing the GetStudentInfosbyCondition(datatype condition) and sql
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<StudentInfoEntity> GetStudentInfosbyCondition(string sql)
        {
            DAL.DALStudentInfo dal = new DAL.DALStudentInfo();
            return dal.GetStudentInfosbyCondition(sql);
        }
        #endregion
        #region Select items Top n
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<StudentInfoEntity> GetStudentInfosTopN(int n)
        {
            DAL.DALStudentInfo dal = new DAL.DALStudentInfo();
            return dal.GetStudentInfosTopN(n);
        }
        #endregion
    }
    #endregion
}
